package com.example.drug.service.impl;

import com.example.drug.domain.Member;
import com.example.drug.mapper.MemberMapper;
import com.example.drug.service.MemberService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 会员服务实现类
 *
 * @author [你的名字]
 * @date [具体日期]
 */
@Service
public class MemberServiceImpl implements MemberService {

    @Autowired
    private MemberMapper memberMapper;

    @Override
    public List<Member> selectAllMembers() {
        return memberMapper.selectAllMembers();
    }

    @Override
    public List<Member> selectMembersByName(String name) {
        return memberMapper.selectMembersByName(name);
    }

    @Override
    public Member selectMemberById(Long id) {
        return memberMapper.selectMemberById(id);
    }

    @Override
    public int insertMember(Member member) {
        return memberMapper.insertMember(member);
    }

    @Override
    public int updateMember(Member member) {
        return memberMapper.updateMember(member);
    }

    @Override
    public int deleteMemberById(Long id) {
        return memberMapper.deleteMemberById(id);
    }
}